<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #bb{
            width: 200px;
            font-size: 14px;
            background-color: blueviolet;
            border: 1px solid rgb(209, 144, 32);
            display:none;
        }
    </style>
</head>
<body>
 
     <label onmouseenter="add()" onmouseleave="dd()">
        <input type="checkbox" >两周内自动登录
    </label> 
    <div id="bb">为了您的信息安全，请不要在网吧或公用电脑上使用此功能！</div>
    
</body>
<script>
    var bb=document.getElementById('bb')
    var labels=document.getElementsByTagName('label')
    function add(){
        // console.log(1);
        bb.style.display='block'
    }
    function dd(){
        // console.log(1);
        bb.style.display='none'
    }
</script>
</html>